home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr26 / netprog.zip / NETPROG.TAR / lpr / defs.h next >
C/C++ Source or Header  |  1989-12-17  |  834b  |  32 lines

  1. /*
  2.  * Definitions for line printer client program.
  3.  */
  4.  
  5. #include    <stdio.h>
  6. #include    <sys/types.h>
  7.  
  8. #define    MAXFILENAME      128    /* max filename length */
  9. #define    MAXHOSTNAMELEN       64    /* max host name length */
  10. #define    MAXLINE          512    /* max ascii line length */
  11.  
  12. #define    LPR_SERVICE    "printer"    /* name of the network service */
  13. #define    SEQNO_FILE    "/tmp/seqno"    /* name of the sequence# file */
  14.  
  15. /*
  16.  * Externals.
  17.  */
  18.  
  19. extern char    hostname[];    /* name of host providing the service */
  20. extern char    printername[];    /* name of printer to use on hostname */
  21. extern int    debugflag;    /* -d command line options */
  22.  
  23. /*
  24.  * Debug macro, based on the debug flag (-d command line argument) with
  25.  * two values to print.
  26.  */
  27.  
  28. #define    DEBUG2(fmt, arg1, arg2)    if (debugflag) { \
  29.                     fprintf(stderr, fmt, arg1, arg2); \
  30.                     fputc('\n', stderr); \
  31.                 } else ;
  32.